/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.cakerun.model.req;

import jakarta.validation.constraints.*;

import lombok.Data;

import io.swagger.v3.oas.annotations.media.Schema;

import org.hibernate.validator.constraints.Length;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;
import java.math.BigDecimal;

/**
 * 指标创建或修改参数
 *
 * @author tangyu
 * @since 2025/07/09 15:45
 */
@Data
@Schema(description = "指标创建或修改参数")
public class StoreMetricsReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录日期
     */
    @Schema(description = "记录日期")
    @NotNull(message = "记录日期不能为空")
    private LocalDate businessTime;
    private Long accountId;
    /**
     * 美团门店ID
     */
    @Schema(description = "美团门店ID")
    @NotNull(message = "美团门店ID不能为空")
    private Long shopId;

    /**
     * 门店名称
     */
    @Schema(description = "门店名称")
    @NotBlank(message = "门店名称不能为空")
    @Length(max = 255, message = "门店名称长度不能超过 {max} 个字符")
    private String shopName;

    /**
     * 省份
     */
    @Schema(description = "省份")
    @NotBlank(message = "省份不能为空")
    @Length(max = 50, message = "省份长度不能超过 {max} 个字符")
    private String province;

    /**
     * 城市
     */
    @Schema(description = "城市")
    @NotBlank(message = "城市不能为空")
    @Length(max = 50, message = "城市长度不能超过 {max} 个字符")
    private String city;

    /**
     * 曝光人数
     */
    @Schema(description = "曝光人数")
    @NotNull(message = "曝光人数不能为空")
    private Integer exposureCount;

    /**
     * 曝光人数环比(百分比)
     */
    @Schema(description = "曝光人数环比(百分比)")
    @NotNull(message = "曝光人数环比(百分比)不能为空")
    private BigDecimal exposureCountRingRatio;

    /**
     * 访问人数
     */
    @Schema(description = "访问人数")
    @NotNull(message = "访问人数不能为空")
    private Integer visitCount;

    /**
     * 访问人数环比(百分比)
     */
    @Schema(description = "访问人数环比(百分比)")
    @NotNull(message = "访问人数环比(百分比)不能为空")
    private BigDecimal visitCountRingRatio;

    /**
     * 曝光-访问转化率(百分比)
     */
    @Schema(description = "曝光-访问转化率(百分比)")
    @NotNull(message = "曝光-访问转化率(百分比)不能为空")
    private BigDecimal exposureToVisitRate;

    /**
     * 曝光-访问转化率环比(百分比)
     */
    @Schema(description = "曝光-访问转化率环比(百分比)")
    @NotNull(message = "曝光-访问转化率环比(百分比)不能为空")
    private BigDecimal exposureToVisitRateRingRatio;

    /**
     * 访问-购买转化率(百分比)
     */
    @Schema(description = "访问-购买转化率(百分比)")
    @NotNull(message = "访问-购买转化率(百分比)不能为空")
    private BigDecimal visitToPurchaseRate;

    /**
     * 访问-购买转化率环比(百分比)
     */
    @Schema(description = "访问-购买转化率环比(百分比)")
    @NotNull(message = "访问-购买转化率环比(百分比)不能为空")
    private BigDecimal visitToPurchaseRateRingRatio;

    /**
     * ROS分
     */
    @Schema(description = "ROS分")
    @NotNull(message = "ROS分不能为空")
    private Integer rosScore;

    /**
     * ROS分环比(百分比)
     */
    @Schema(description = "ROS分环比(百分比)")
    @NotNull(message = "ROS分环比(百分比)不能为空")
    private BigDecimal rosScoreRingRatio;
}